package com.zut.base.controller;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.zut.base.common.entry.Pagination;
import com.zut.base.entity.Interface;
import com.zut.base.entity.Project;
import com.zut.base.service.IInterfaceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * <p>
 * 接口表 前端控制器
 * </p>
 *
 * @author yyl
 * @since 2021-03-31
 */
@RestController
@RequestMapping("/imp/interface")
public class InterfaceController {

    @Autowired
    private IInterfaceService iInterfaceServiceImpl;

    //查询接口列表
    @GetMapping("/getInterfaceList")
    public Object getInterfaceList(@NotNull String projectId, int pageNo, int size){
        Pagination pagination = new Pagination();
        pagination.setCurrent(pageNo);
        pagination.setSize(size);
        QueryWrapper<Interface> wrapper = new QueryWrapper<>();
        wrapper.eq("projectId",projectId);
        //待完善
//        E page = iInterfaceServiceImpl.(pagination, wrapper);

        return "";
    }

    //添加接口
//    @PostMapping("/addNewInterface")
//    public Object addNewInterface(){
//
//    }
}
